// 会员信息
export interface MemberModel{
    id:any
    idCard:string
    name:string
    email:string
    phone:string
    address:string
    igAasId:string
    surname:string
    egName:string
    birthday:any
    province:string
    city:string
    createTime:any
    postal:string
    enAddress:string
    workList:WorkModel[],
    educationList:EducationModel[]

}

export async function memberInfoApi(){
  return useGet<MemberModel>('/member/info')
}

export interface MemberParam{
  id:any
  idCard:string
  name:string
  email:string
  phone:string
  address:string
  igAasId:string
  surname:string
  egName:string
  birthday:any
  province:string
  city:string 
  postal:string
  enAddress:string
}

export async function updateMemberInfo(param:MemberParam){
  return usePut<MemberModel>('/member/update',param)
}


//教育经历 
export interface EducationModel{
    id:any
    education:string
    school:string
    major:string
    graduationTime:any
    notes:string
}

export async function saveEducation(param:EducationModel){
  return usePost<EducationModel>('/member/saveOrUpdateEducation',param)
}

export async function removeEducation(id:any){
  return useDelete(`/member/removeEducation/${id}`)
}


//工作经历
export interface WorkModel{
    id:any
    company:string
    position:string
    entryDate:any
    resignDate:any
    post:string
    notes:string
}

export async function saveWork(param:WorkModel){
    return usePost<WorkModel>('/member/saveOrUpdateWork',param)
}

export async function removeWork(id:any){
    return useDelete(`/member/removeWork/${id}`)
  }
  

